import 'package:flutter/material.dart';
import 'package:flutter_widget/custom/custom_appbar.dart';

// ignore: must_be_immutable
class ContainerPage extends StatelessWidget {
  String name;
  ContainerPage({Key? key, required this.name}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CustomAppbar(name, Theme.of(context).primaryColor),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Container(
                child: const Icon(Icons.add),
                width: 400,
                height: 400,
                alignment: Alignment.center,
                padding: const EdgeInsets.all(10.0),
                margin: const EdgeInsets.all(10.0),
                //  color: Theme.of(context).primaryColor,
                decoration: BoxDecoration(
                  image: DecorationImage(
                    image: const NetworkImage(
                        'https://cms-dumall.cdn.bcebos.com/cms_upload_pro/cms_1633138913464.jpg?x-bce-process=image/quality,q_80/format,f_auto/interlace,i_progressive'),
                    alignment: Alignment.center,
                    fit: BoxFit.cover,
                    colorFilter: ColorFilter.mode(
                        Colors.indigoAccent[400]!.withOpacity(0.5),
                        BlendMode.hardLight),
                  ), // 颜色滤镜
                )

                // decoration: BoxDecoration(
                //   color: Theme.of(context).primaryColor,
                //   border: Border.all(
                //       color: Colors.red, width: 2.0, style: BorderStyle.solid), //边框
                //   shape: BoxShape.circle,
                //   // borderRadius: BorderRadius.circular(16.0),圆角
                //   // gradient:const RadialGradient(
                //   //   colors: [
                //   //     Colors.cyan,
                //   //     Colors.purple,
                //   //   ],
                //   // ), //径向渐变
                //   gradient:const LinearGradient(
                //     colors: [
                //       Colors.cyan,
                //       Colors.purple,
                //     ],
                //     begin: Alignment.bottomLeft,
                //     end: Alignment.bottomCenter
                //   ),
                // ),
                )
          ],
        ),
      ),
    );
  }
}
